# 7.6
s = set('cheeseshop')
print(s)
t = frozenset('booksshop')
print(t)
s.add('z')
print(s)
s.update('pypi')
print(s)
s.remove('z')
print(s)
s -= set('pypi')
print(s)

# 7.7
print(s, t)
print(s | t)
print(s & t)
print(s - t)
print(s ^ t)

print(t | s)
print(t & s)
print(t - s)
print(t ^ s)

# TypeError: unsupported operand type(s) for +: 'set' and 'frozenset'
# print(s+t)

s |= set('pypi')
print(s)
